package com.tbit.common.constant;

/**
 * 操作日志模板枚举
 * @author <a href="mailto:liu.haoxiang@tbit.com.cn">BUGXiang</a>
 * @version 1.0
 * @since 2025-2-6
 */
public enum ModuleEnum {
    NONE(""),

    MAINACCOUNT("运营区域配置模块", "str_main_accountConfig"),
    ACCOUNTUSERCONFIG("运维人员语音配置模块", "str_main_accountUserConfig"),
    MAINACCOUNTUSER("账号模块", "str_main_accountUser"),
    ACCOUNTUSERWORKCONFIG("运维人员工单配置模块", "str_main_accountUserWorkConfig"),
    BATTERY("电池模块", "str_main_battery"),
    BATTERYMODULE("电池型号模块", "str_main_batteryModule"),
    BLEBEACON("道钉模块", "str_main_bleBeacon"),
    BMSBATCH("云bms批次模块", "str_main_bmsBatch"),
    BMSBATTERY("云bms电池模块", "str_main_bmsBattery"),
    BMSCONFIG("bms配置模块", "str_main_bmsConfig"),
    CHARGEHOUSE("充电坊模块", "str_main_chargeHouse"),
    WAREHOUSE("仓库模块", "str_main_wareHouse"),
    MAINCLASSESCONFIG("班次配置模块", "str_main_ClassesConfig"),
    COMMONFUNCTION("用户常用功能模块", "str_main_commonFunction"),
    MAINDETENTIONAREA("扣押区模块", "str_main_detentionArea"),
    DETENTIONMACHINE("扣押车辆模块", "str_main_detentionMachine"),
    DEVICEPRIORITY("功能优先级模块", "str_main_devicePriority"),
    DISPATCHCONFIG("调度配置模块", "str_main_dispatchConfig"),
    GEOREGION("围栏分区模块", "str_main_geoRegion"),
    HELMET("头盔锁绑定模块", "str_main_helmet"),
    JPUSH("极光推送模块", "str_main_JPush"),
    MACHINEALARM("资产预警模块", "str_main_MachineAlarm"),
    MACHINE("设备模块", "str_main_machine"),
    MACHINEFUNCTION("设备功能配置模块", "str_main_machineFunction"),
    MACHINELOST("丢失车辆配置模块", "str_main_machineLost"),
    MACHINEMANAGER("设备管理模块", "str_main_machineManager"),
    MAINCAR("运维人员车辆管理模块", "str_main_mainCar"),
    MOVECONFIG("挪车配置模块", "str_main_moveConfig"),
    PARKPOINTBOUND("站点设备绑定模块", "str_main_parkPointBound"),
    PARKFEATURE("站点功能配置模块", "str_main_parkFeature"),
    MAINPARKPOINT("停车点模块", "str_main_parkPoint"),
    VERT("垂直停车配置模块", "str_main_vert"),
    POWERCONFIG("电量额度配置模块", "str_main_powerConfig"),
    FORBIDDEN("禁行区配置模块", "str_main_forbidden"),
    RECOVERYLOG("车辆回收管理模块", "str_main_recoveryLog"),
    USERBLACKLIST("用户黑名单模块", "str_main_userBlackList"),
    WORKORDERCONFIG("区域工单开关设置模块", "str_main_workOrderConfig"),
    WORKTYPE("工单类型模块", "str_main_workType"),
    MAINMANNED("载人模块(运维)", "str_main_manned"),
    ACCOUNT_USER_ALARM("预警账号模块", "str_mou_account_user_alarm"),
    STOCKMACHINE("出入库模块", "stockMachine"),
    ORDER("订单模块", "str_mou_order"),

    VER_CODE("验证码模块", "str_mou_code"),
    ACCOUNT("账户模块", "str_mou_account"),
    ACCOUNTUSER("账号模块", "str_mou_accountuser"),
    ADVERTISING("广告模块", "str_mou_advertising"),
    ADOPT("领养模块", "str_mou_adopt"),
    FREETIME("免押模块", "str_mou_freetime"),
    GEO("围栏模块", "str_mou_geo"),
    COMPALINT("客诉模块","str_complaint"),
    REGION("分区模块", "str_mou_georegion"),
    PARKPOINT("停车点模块", "str_mou_park"),
    USERBLACK("黑名单模块", "str_mou_black"),
    USER("用户模块", "str_mou_user"),
    TER_CONTROL("终端控制模块", "str_mou_control"),
    TER_MANAGER("终端管理模块", "str_mou_manager"),
    ACCOUNTFEE("计费模块", "str_mou_fee"),
    DEPOSITCARD("免押卡模块", "str_mou_depositcard"),
    RIDECARD("骑行卡模块", "str_mou_ridecard"),
    RIDING_SCORE("骑行分模块", "str_riding_score"),
    VIPCARD("会员卡模块", "str_mou_vipcard"),
    COUPON("优惠券模块", "str_mou_coupon"),
    FESTIVALACTIVITY("节日活动模块", "str_mou_festivalactivity"),
    SYSTEM_CONFIGS("系统配置模块", "str_mou_system_config"),
    APPOINTMENT("预约模块", "str_mou_appointment"),
    BATTERYMODEL("电池方案模块", "str_mou_batterymodel"),
    BATTERYMODELDETAIL("电池方案详情模块", "str_mou_batterymodeldetail"),
    GIFTCARD("礼品卡模块", "str_mou_giftcard"),
    RECHARGEGIVE("充值赠送模块", "str_mou_recharge"),
    DEPOSIT("押金模块", "str_mou_deposit"),
    ADVERT("广告模块", "str_mou_advert"),
    NEWUSER("新用户赠送模块", "str_mou_newuser"),
    USER_FACE_IDENTIFY("用户人脸识别", "str_mou_user_face_identify"),
    CARDSHARING("卡共享模块", "str_mou_cardsharing"),
    DICTDATA("字典数据模块", "str_mou_dictdata"),
    DICTTYPE("字典类型模板", "str_mou_dicttype"),
    MENU("菜单模块", "str_mou_menu"),
    ROLE("角色模块", "str_mou_role"),
    WORKORDER("工单模块", "str_mou_workorder"),
    OTA("ota模块", "str_mou_ota"),
    POWERCHANGELOG("换电记录模块", "powerchange_log"),
    SUBACCOUNT("分账账号管理模块", "str_mou_subaccount"),
    BMS("云bms模块", "str_mou_bms"),
    OPERATIONS_MANAGEMENT("运维管理模块", "str-mou-operations_management"),
    REFUND("退款操作模块", "str_mou_refund_operation"),
    CARD_ACCOUNT_BOUND("区域共享配置模块", "str_mou_car_account_bound"),
    NOTICETHAT("购买须知配置", "notice_that"),
    COUPONPACKAGE("优惠券套餐配置", "coupon_package"),
    DETENTIONAREA("扣押区配置", "detention_area"),
    VERTICALPARKING("垂直停车配置", "vertical_parking"),
    MANUALWORKORDER("手动工单类型配置", "manual_workOrder"),
    HOTINTELLIGENTSITE("增设站点推荐", "hotintelligent_site"),
    LESSINTELLIGENTSITE("移除站点推荐", "lessIntelligent_site"),
    ADVERTCONFIG("广告来源配置", "advert_config"),
    RUSHPAYFEECONFIG("催缴配置", "rushpayfee_config"),
    DISCOUNTCONFIG("认证配置", "discount_config"),
    OTAACCESSKEY("ota访问配置", "ota_accesskey"),
    ACTIVITYCONFIG("活动配置", "activity_config"),
    CLASSESCONFIG("排班设置", "classes_config"),
    UNIAPPMENU("自定义配置", "uniapp_menu"),
    AUTH_WHITE_LIST("证件白名单", "auth_white_list"),
    VOICE_CUSTOM("自定义语音模块", "voice_custom"),
    MACHINE_GROUP("车辆分组模块", "machine_group"),
    MANNED("载人设备模块", "manned"),
    OPERA_PSW("操作密钥模块", "opera_psw"),
    NOTICE("公告管理模块", "notice"),
    PERFORMANCE("运维绩效模块", "performance"),
    PROTOCOL("服务协议模块", "protocol"),
    DISPATCHLOG("调度配置模块", "dispatch_log"),
    BRAND_SHARE_CONFIG("品牌共享配置模块", "brand_share_config"),
    ;

    private String name;
    private String sn;

    ModuleEnum(String sn) {
        this.sn = sn;
        this.name = sn;
    }

    ModuleEnum(String name, String sn) {
        this.name = name;
        this.sn = sn;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    // 根据 sn 获取枚举值
    public static ModuleEnum getBySn(String sn) {
        for (ModuleEnum module : ModuleEnum.values()) {
            if (module.getSn().equals(sn)) {
                return module;
            }
        }
        return NONE;
    }

    // 根据 name 获取枚举值
    public static ModuleEnum getByName(String name) {
        for (ModuleEnum module : ModuleEnum.values()) {
            if (module.getName().equals(name)) {
                return module;
            }
        }
        return NONE;
    }
}